package com.yfqy.admin.security.login;

import com.yfqy.admin.enums.LoginTypeEnum;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

import java.util.List;

/**
 * @Author: 梁二东
 * @Date: 2025/5/6 16:41
 * @Description:
 **/

@Data
public class LoginUserInfo {
    /**
     * username,sms,openid
     */
    private LoginTypeEnum loginType;
    private String sessionId; // 会话id，全局唯一
    private Long id;
    private String nickname; // 昵称

    private Long expiredTime; // 过期时间

    // 登录用的角色+权限
    private List<GrantedAuthority> authorities;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 微信openid
     */
    private String openid;

    /**
     * 微信unionid
     */
    private String unionid;

    /**
     * 注册来源ID
     */
    private Long regFromId;
}
